/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.src.ptit.javatraining.huynh.btvn1;

import java.util.Scanner;

/**
 *
 * @author user
 */
public class Baitap5 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n;
        try {
            n = sc.nextInt();
            long[] a = new long[n + 1];
            a[0] = 0;
            a[1] = 1;
            for (int i = 2; i <= n; i++) {
                a[i] = a[i - 1] + a[i - 2];
            }
            System.out.println(a[n]);
        } catch (Exception e) {
            System.out.println("Nhap lai !");

        }
    }
}
